
import Applaction from '../src'
import ComicPlugin from '../src/plugins/comic';
import PanelPlugin from '../src/plugins/panel';
import MenuPlugin from '../src/plugins/menu';
import CNZZPlugin from '../src/plugins/cnzz';
import HistoryURLPlugin from '../src/plugins/historyURL';
import CNZZModule from '../src/modules/cnzz';
import "../src/static/styles/index.scss";
const app = window.app = new Applaction({
  configureAxios: {
    // baseURL: 'http://m.kanman.com'
    baseURL: 'http://localhost:3002'
  }
  // 这里是漫画相关配置
}, document.getElementById('app'));

// 使用插件
app.use(ComicPlugin, {
  isBefore: true,
  // maxWidth: 320,
  api: {
    getChapterInfo: `http://localhost:8510/api/comic/chapter`,
    getAdjoinChapterInfo: `http://localhost:8510/api/comic/adjoin_chapter`,
  },
  comicId: 5,
  chapterId: 119500
});
app.use(PanelPlugin);
app.use(CNZZPlugin, {
  modules: { cnzz: new CNZZModule(1261814609) }
});
app.use(MenuPlugin);
app.use(HistoryURLPlugin);

// 运行服务
app.run(ctx => {
  ctx.logger.log('应用已经启动');
});
